package com.lyhui.nursingorder5060.service.impl;

import com.lyhui.nursingorder5060.pojo.OrderVerify;
import com.lyhui.nursingorder5060.dao.OrderVerifyMapper;
import com.lyhui.nursingorder5060.service.OrderVerifyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * OrderVerify表的服务实现类
 *
 * @author lyhui
 * @create-time 2020-02-20 19:56:57
 */
@Service("orderVerifyService")
public class OrderVerifyServiceImpl implements OrderVerifyService {
    //private static final Logger logger = LoggerFactory.getLogger(OrderVerifyServiceImpl.class);
    
    @Resource
    private OrderVerifyMapper orderVerifyMapper;
    
    /**
     * 查询OrderVerify表的所有记录
     *
     * @return OrderVerify的实例对象集合List（封装了OrderVerify表的所有记录）
     */
    @Override
    public List<OrderVerify> queryAllOrderVerify() {
        return this.orderVerifyMapper.queryAllOrderVerify();
    }
    
    /**
     * 查询OrderVerify表中的一条记录
     *
     * @param  orderVerify（封装了相关查询条件）
     * @return OrderVerify的实例对象（封装了OrderVerify表的一条记录）
     */
     @Override
    public OrderVerify queryOrderVerifyByParam(OrderVerify orderVerify){
        if(orderVerify==null){
            return null;
        }
        return this.orderVerifyMapper.queryOrderVerifyByParam(orderVerify);
    }
    
    /**
     * 查询OrderVerify表中的多条记录
     *
     * @param  orderVerify（封装了相关查询条件）
     * @return OrderVerify的实例对象集合List（封装了OrderVerify表的多条记录）
     */
    public List<OrderVerify> queryOrderVerifyListByParam(OrderVerify orderVerify){
        if(orderVerify==null){
            return null;
        }
        return this.orderVerifyMapper.queryOrderVerifyListByParam(orderVerify);
    }
    
    /**
     * 在OrderVerify表中的添加一条记录
     *
     * @param  orderVerify（封装了想要添加的记录信息）
     * @return 添加记录的反馈结果(1:添加记录成功；0：添加记录失败)
     */
    @Override
    public int insertOrderVerify(OrderVerify orderVerify) {
        if(orderVerify==null){
            return 0;
        }
        return this.orderVerifyMapper.insertOrderVerify(orderVerify);
    }

    /**
     * 修改OrderVerify表中的一条记录
     *
     * @param  orderVerify（封装了准备修改的记录信息）
     * @return 修改记录的反馈结果(1:修改记录成功；0：修改记录失败)
     */
    @Override
    public int updateOrderVerify(OrderVerify orderVerify) {
        if(orderVerify==null){
            return 0;
        }
        return this.orderVerifyMapper.updateOrderVerify(orderVerify);
    }

    /**
     * 删除OrderVerify表中的一条记录
     *
     * @param  verifyId ： OrderVerify表的主键
     * @return 删除记录反馈结果(1：删除记录成功|0：删除记录失败)
     */
    @Override
    public int deleteOrderVerifyById(Integer verifyId) {
        if(verifyId==null){
            return 0;
        }
        return this.orderVerifyMapper.deleteOrderVerifyById(verifyId);
    }
}